my @out_1;
my @out_2;
my @out_3;
push(@out_1,"c(");
push(@out_2,"c(");
push(@out_3,"c(");
my @chrs=(1..22,"X","Y","M");

foreach my $chr(@chrs){
	my @samples=("normal","tumor");
	foreach my $sample(@samples){
		$mychr="chr".$chr;
		my $file="methylCGsRich_ASM_".$sample."Merge_".$mychr."_SNP_afterBaseQfilter.txt";
	#	print "$file\n";
		open(FH,"</Users/yaping/Documents/workspace/result/ASM/$file");
		my @in=<FH>;
		chomp(@in);
		close(FH);
		my $num= $#in+1;
		push(@out_1,"\"$sample-$mychr\",");
		push(@out_2,"$num,");
		if($sample eq "normal"){
			push(@out_3,"\"red\",");
		}
		else{
			push(@out_3,"\"blue\",");
		}
	}
}

push(@out_1,")\n");
push(@out_2,")\n");
push(@out_3,")\n");
print(@out_1);
print(@out_2);
print(@out_3);

